#include <gvl/test/test.hpp>

#include <gvl/test/gvl_tests.hpp>

#include <ctime>

GVLTEST_DEF_CONTEXT(psync)

int main()
{
	//GVLTEST_CONTEXT(psync).run_all_suites();
	GVLTEST_CONTEXT(gvl).run_all_suites();



#if 0
	std::clock_t t = std::clock();
	uint32_t acc = 0;
	for(int iter = 0; iter < 999999; ++iter)
	{
		uint32_t a = 0, b = 1;
		for(int i = 0; i < 99; ++i)
		{
			uint32_t temp = a + b;
			a = b;
			b = temp;

			acc += a;
		}
	}
	t = std::clock() - t;


	std::clock_t t = std::clock();
	double acc = 0;
	for(int iter = 0; iter < 999999; ++iter)
	{
		double a = iter, b = 1;
		for(int i = 0; i < 25; ++i)
		{
			double temp = a + b;
			a = b;
			b = temp;
			acc += a;

			temp = a + b;
			a = b;
			b = temp;
			acc += a;

			temp = a + b;
			a = b;
			b = temp;
			acc += a;

			temp = a + b;
			a = b;
			b = temp;
			acc += a;
		}
	}
	t = std::clock() - t;

	printf("Time: %f, %d\n", (1000.0 * t) / CLOCKS_PER_SEC, acc);
#endif
}
